float Xval = 0, Yval = 0, Zval = 0;
bool OCenabled = false, aniEnabled = false, firstTower = true, shadingEnabled =
		false, lightEnabled = false;

// use glutKeyboardFunc(keyboardCallback); to apply controls
void keyboardCallback(unsigned char key, int x, int y) {
	switch (key) {
	case 27: //Escape
		exit(1);
		break;
	case 'w':
		Zval += 1;
		break;
	case 's':
		Zval -= 1;
		break;
	case 'a':
		Xval += 1;
		break;
	case 'd':
		Xval -= 1;
		break;
	case 'q':
		Yval -= 1;
		break;
	case 'e':
		Yval += 1;
		break;
	case 't':
		firstTower = firstTower ? false : true;
		break;
	case 'f':
		fpsToggle = fpsToggle ? false : true;
		break;
	case 'c':
		OCenabled = OCenabled ? false : true;
		if (OCenabled)
			std::cout << "Object culling enabled!\n";
		else
			std::cout << "Object culling disabled!\n";
		break;
	case 'm':
		aniEnabled = aniEnabled ? false : true;
		if (aniEnabled)
			std::cout << "Animation enabled!\n";
		else
			std::cout << "Animation disabled!\n";
		break;
	case 'l':
		lightEnabled = lightEnabled ? false : true;
		if (lightEnabled)
			std::cout << "Light enabled!\n";
		else
			std::cout << "Light disabled!\n";
		break;
	case 'p':
		shadingEnabled = shadingEnabled ? false : true;
		if (shadingEnabled)
			std::cout << "Shading enabled!\n";
		else
			std::cout << "Shading disabled!\n";
		break;
	case '1':
		tex->speed = 0.01;
		break;
	case '2':
		tex->speed = 0.2;
		break;
	case '3':
		tex->speed = 0.3;
		break;
	case '4':
		tex->speed = 0.4;
		break;
	case '5':
		tex->speed = 0.5;
		break;
	case '6':
		tex->speed = 0.6;
		break;
	case '7':
		tex->speed = 0.7;
		break;
	case '8':
		tex->speed = 0.8;
		break;
	case '9':
		tex->speed = 0.9;
		break;
	default:
		break;
	}
}
